@{
    Layout=null;
}
@using mvc.Models;
@model Book;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        @if(Model==null){
            <table>
            <tr hidden>
                <td>
                    Id: <input type="text" id="Id">
                </td>
            </tr>
            <tr>
                <td>
                    书名: <input type="text" id="BookName">
                </td>
            </tr>
            <tr>
                <td>
                    @* 图书馆Id: <input type="text" id="LibraryId"> *@
                    <select name="" id="">
                        <option value="" selected>请选择图书馆</option>
                        @foreach (var item in ViewBag.l)
                        {
                            <option class="option"  value="@item.Id">@item.BookName</option>
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                  <input type="button" value="保存" onclick="Save()">
                  <input type="button" value="取消" onclick="Cancal()">
                </td>
            </tr>
        </table>
        }else{

       
        <table>
            <tr hidden>
                <td>
                    Id: <input type="text" id="Id" value="@Model.Id">
                </td>
            </tr>
            <tr>
                <td>
                    书名: <input type="text" id="BookName" value="@Model.BookName">
                </td>
            </tr>
            <tr>
                <td>
                    图书馆Id: <input type="text" id="LibraryId" value="@Model.LibraryId">
                     <select name="" id="">
                        @* <option value="" selected>请选择图书馆</option> *@
                        @foreach (var item in ViewBag.l)
                        {
                            <option class="option"  value="@item.Id">@item.BookName</option>
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                  <input type="button" value="保存" onclick="Save()">
                  <input type="button" value="取消" onclick="Cancal()">
                </td>
            </tr>
        </table>
         }
    </div>
</body>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/js/Base.js"></script>
</html>